package com.clkj.zhonghui.pojo.order;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * @author yawang
 * @date 2024-07-11
 * 订单主表
 */
@ApiModel( value ="t_zh_mainOrder" )
@Table( name ="t_zh_mainOrder" )
public class MainOrder  implements Serializable {

    @Id
   	@Column(name = "main_id" ,updatable = false)
	@ApiModelProperty( value="null")
	private Integer mainId;

	/**
	 * 订单号
	 */
   	@Column(name = "order_number" )
	@ApiModelProperty( value="订单号,添加订单不需要传")
	private String orderNumber;

	/**
	 * 生成订单时间
	 */
   	@Column(name = "order_date" )
	@ApiModelProperty( value="生成订单时间,添加订单不需要传")
	private String orderDate;

	/**
	 * 收件人名称
	 */
   	@Column(name = "user_name" )
	@ApiModelProperty( value="收件人名称")
	private String userName;

	/**
	 * 收货电话
	 */
   	@Column(name = "user_tel" )
	@ApiModelProperty( value="收货电话")
	private String userTel;

	/**
	 * 收货地址
	 */
   	@Column(name = "user_addr" )
	@ApiModelProperty( value="收货地址")
	private String userAddr;

	/**
	 * 总金额
	 */
   	@Column(name = "total_money" )
	@ApiModelProperty( value="总金额")
	private Double totalMoney;

	/**
	 * 实际总金额
	 */
   	@Column(name = "real_money" )
	@ApiModelProperty( value="实际总金额")
	private Double realMoney;

	/**
	 * 订单状态 0未支付 1已支付 2一番或 3已完成 4已取消 5售后
	 */
   	@Column(name = "order_status" )
	@ApiModelProperty( value="订单状态 0未支付 1已支付 2一番或 3已完成 4已取消 5售后   ,添加订单不需要传")
	private Integer orderStatus;

	/**
	 * 支付时间
	 */
   	@Column(name = "pay_date" )
	@ApiModelProperty( value="支付时间")
	private String payDate;

	/**
	 * 物流公司
	 */
   	@Column(name = "wu_company" )
	@ApiModelProperty( value="物流公司")
	private String wuCompany;

	/**
	 * 物流单号
	 */
   	@Column(name = "wu_order" )
	@ApiModelProperty( value="物流单号")
	private String wuOrder;

	/**
	 * 物流编码
	 */
   	@Column(name = "wu_code" )
	@ApiModelProperty( value="物流编码")
	private String wuCode;

	/**
	 * 支付方式
	 */
   	@Column(name = "pay_way" )
	@ApiModelProperty( value="支付方式")
	private String payWay;

	/**
	 * 用户ID
	 */
   	@Column(name = "user_id" )
	@ApiModelProperty( value="用户ID")
	private Integer userId;

	/**
	 * 门店ID
	 */
   	@Column(name = "shop_id" )
	@ApiModelProperty( value="门店ID")
	private Integer shopId;

	/**
	 * 微信支付成功流水号
	 */
   	@Column(name = "transaction_id" )
	@ApiModelProperty( value="微信支付成功流水号")
	private String transactionId;

    /**
     * 使用储值金数
     */
    @Column(name = "used_stored" )
    @ApiModelProperty( value="使用储值金数（当为功能为中汇积分兑换时，此字段为使用的现金数）")
    private Double usedStored;

    /**
     * 优惠金额，优惠券金额
     */
    @Column(name = "used_yh" )
    @ApiModelProperty( value="优惠金额，优惠券金额（当为功能为中汇积分兑换时，此字段为使用的积分数）")
    private Double usedYh;

    @Transient
    @ApiModelProperty( value="父级ID，没有传0，如果是3650活动的首次购买鸡胚胎，传-1，用券购买传-2")
    private Integer parentId;

    public Integer getHighestId() {
        return highestId;
    }

    public void setHighestId(Integer highestId) {
        this.highestId = highestId;
    }

    @Transient
    @ApiModelProperty( value="上上级ID，没有传0")
    private Integer highestId;

   	@Transient
    private List<Order> orderList;

  public Integer getMainId() {
    return mainId;
  }

  public void setMainId(Integer mainId) {
    this.mainId = mainId;
  }


  public String getOrderNumber() {
    return orderNumber;
  }

  public void setOrderNumber(String orderNumber) {
    this.orderNumber = orderNumber;
  }


  public String getOrderDate() {
    return orderDate;
  }

  public void setOrderDate(String orderDate) {
    this.orderDate = orderDate;
  }


  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }


  public String getUserTel() {
    return userTel;
  }

  public void setUserTel(String userTel) {
    this.userTel = userTel;
  }


  public String getUserAddr() {
    return userAddr;
  }

  public void setUserAddr(String userAddr) {
    this.userAddr = userAddr;
  }


  public Double getTotalMoney() {
    return totalMoney;
  }

  public void setTotalMoney(Double totalMoney) {
    this.totalMoney = totalMoney;
  }


  public Double getRealMoney() {
    return realMoney;
  }

  public void setRealMoney(Double realMoney) {
    this.realMoney = realMoney;
  }


  public Integer getOrderStatus() {
    return orderStatus;
  }

  public void setOrderStatus(Integer orderStatus) {
    this.orderStatus = orderStatus;
  }


  public String getPayDate() {
    return payDate;
  }

  public void setPayDate(String payDate) {
    this.payDate = payDate;
  }


  public String getWuCompany() {
    return wuCompany;
  }

  public void setWuCompany(String wuCompany) {
    this.wuCompany = wuCompany;
  }


  public String getWuOrder() {
    return wuOrder;
  }

  public void setWuOrder(String wuOrder) {
    this.wuOrder = wuOrder;
  }


  public String getWuCode() {
    return wuCode;
  }

  public void setWuCode(String wuCode) {
    this.wuCode = wuCode;
  }


  public String getPayWay() {
    return payWay;
  }

  public void setPayWay(String payWay) {
    this.payWay = payWay;
  }


  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }


  public Integer getShopId() {
    return shopId;
  }

  public void setShopId(Integer shopId) {
    this.shopId = shopId;
  }


  public String getTransactionId() {
    return transactionId;
  }

  public void setTransactionId(String transactionId) {
    this.transactionId = transactionId;
  }

    public List<Order> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<Order> orderList) {
        this.orderList = orderList;
    }

    public Double getUsedStored() {
        return usedStored;
    }

    public void setUsedStored(Double usedStored) {
        this.usedStored = usedStored;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Double getUsedYh() {
        return usedYh;
    }

    public void setUsedYh(Double usedYh) {
        this.usedYh = usedYh;
    }
}
